package qq2564874169.tuaotuao.fx.mq;


import qq2564874169.tuaotuao.fx.Action1T;
import qq2564874169.tuaotuao.fx.utils.ClassUtil;

public interface MqBeanDispatcher {
    void register(Class<?> clazz);

    void push(MqBean bean);

    default <T extends MqBean> void push(Class<T> clazz, Action1T<T> action) {
        T bean = ClassUtil.setNew(clazz);
        action.execute(bean);
        push(bean);
    }
}
